<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <title>IGloballist CMS</title>
   <link href="../Themes/Standard/Standard.css" rel="stylesheet" type="text/css" />
   <script language="javascript" type="text/javascript" src="../Editors/tinymce/tiny_mce.js"></script>
   
   <script language="javascript" type="text/javascript">
		tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		elements : "elm1",
		plugins : "devkit,style,layer,table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,searchreplace,contextmenu,paste,directionality,fullscreen",
		theme_advanced_buttons1_add_before : "separator",
		theme_advanced_buttons1_add : "fontselect,fontsizeselect",
		theme_advanced_buttons2_add : "insertdate,inserttime,preview,separator,forecolor,backcolor",
		theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search",
		theme_advanced_buttons3_add_before : "tablecontrols,separator",
		theme_advanced_buttons3_add : "emotions,advhr,fullscreen",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_path_location : "bottom",
		content_css : "example_full.css",
	    plugin_insertdate_dateFormat : "%Y-%m-%d",
	    plugin_insertdate_timeFormat : "%H:%M:%S",
		extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
		external_link_list_url : "example_link_list.js",
		external_image_list_url : "example_image_list.js",
		flash_external_list_url : "example_flash_list.js",
		media_external_list_url : "example_media_list.js",
		template_external_list_url : "example_template_list.js",
		file_browser_callback : "fileBrowserCallBack",
		theme_advanced_resize_horizontal : false,
		theme_advanced_resizing : true,
		nonbreaking_force_tab : true,
		apply_source_formatting : true,
		template_replace_values : {
			username : "Jack Black",
			staffid : "991234"
		},
		relat2ive_urls : false,
		rem2ove_script_host : false
	});

	function fileBrowserCallBack(field_name, url, type, win) {
		// This is where you insert your custom filebrowser logic
		alert("Example of filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);

		// Insert new URL, this would normaly be done in a popup
		win.document.forms[0].elements[field_name].value = "someurl.htm";
	}
	
		function _JsExp(){
			this.over=function(el){
				el.className="over";
			};
			this.out=function(el){
				el.className="out";
			};

			this.overCat=function(el){
				el.className="over";
			};
			this.outCat=function(el){
				el.className="out";
			};
			this.search=function(obj)
			{
				alert("do");
				obj.submit();
			};
			this.openUrl=function(url)
			{
				 myRef = window.open(url,'','left=20,top=20,,,toolbar=1,resizable=1,scrollbars=1');
			};
			
            this.AddForum=function()
			{
				document.addForum.submit();
			};
			
			this.saveTopics=function()
			{			
				document.addTopic.submit();
			};		
			
			this.saveContent=function()
			{				
				document.addContent.submit();
			};
			
			this.SaveThread=function()
			{				
				document.addThread.submit();
			};
			
			this.attachFile=function()
			{
			   myRef = window.open('../__uploadFile.aspx?content='+ document.addContent.txtContentDescription.value ,'','left=200,top=200,width=500,height=100,toolbar=0,resizable=0,scrollbars=0');
			};
			
			this.chageFile=function()
			{			
				 if(document.addContent.cbfile.selectedIndex>0)
				 {
					sfile= document.addContent.cbfile.options[document.addContent.cbfile.selectedIndex].text;
					document.addContent.txtContentDescription.value = document.addContent.txtContentDescription.value + "[attachment=" + sfile+"]";
					tinyMCE.execCommand('mceInsertContent',false,document.addContent.txtContentDescription.value);
				 }
			};
			
			
			this.openImage=function(forum)
			{
				 myRef = window.open('../ImageOpen.aspx?forum=' + forum ,'','left=100,top=100,width=600,height=600,toolbar=0,resizable=0,scrollbars=0');
			};
			
			this.Jumpto=function()
			{				
				var jumpto=document.jumpto.ddlJumpto.value;				
				location.href=('../'+jumpto+'/default.aspx');					
			};
			this.Jumptoview=function()
			{				
				var jumpto=document.jumptoview.ddlJumptoview.value;				
				location.href=('../'+jumpto+'/default.aspx');					
			};
						
			this.SaveReply=function()
			{				
				document.addQuote.submit();			
			};
			
			this.DeleteContent=function(cid,pid,tid)
			{	
				var n=confirm('Do you want delete?');			
				if(n)
					location.href=('../ForumManagement.aspx?dlecontent=1&contentId='+cid+'&pageID='+pid+'&topicId='+tid);
			};
			
			this.editContent=function()
			{				
				document.editContent.submit();
			};
			
			this.editTopic=function(v,pid,tid)
			{
				//alert('giatri'+v+' F '+pid + "t=" + tid);
			    location.href=('../ForumManagement.aspx?permission=1&value='+v+'&pageID='+pid+'&topicId='+tid);			   
			}
			this.editThread=function(v,pid,tid)
			{
				//alert('giatri'+v+' F '+pid + "t=" + tid);
			    location.href=('../ForumManagement.aspx?editThread=1&value='+v+'&pageID='+pid+'&topicId='+tid);			   
			}
			
		
		}
		var JsExp=new _JsExp();
</script>
</head>

#set ($line = 0)

#set ($count = 0)
#macro( bindPage $PageList )
	#if($itemList)
		#set ($tempList = $itemList)
	#end
	#set ($line = ${line}+1)

	#if ($line > 2)
	  #set ($line = 1)
	#end

	#if ($PageList.Count>0)
		<ul>
		#foreach($p in $PageList)
			#if ($count==0)
				#set($ID=0)
			#else
				#set($ID=$p.ID)
			#end
			#set ($count = ${count}+1)

			#if($p.Hidden == true)
				#if($p.ID==$cp.ID)
					<li><a href="../${ID}${ex}" > $p.Name  </a></li>
				#else
					<li><a href="../${ID}${ex}" > $p.Name  </a></li>
				#end
			#end

		    #if($p.IsActive)
				#set ($itemList = $p.SubPageList)
			#end

		#end
	    </ul>
	#end
		#if($itemList)
			#if($itemList!=$tempList)
				#bindPage($itemList)
			#end
		#end
#end

#set ($cp = $RenderCtx.CurrentPage)
#set ($cpID=$RenderCtx.CurrentPage.ID)
#set ($pl = $RenderCtx.PageList)
#set ($cProduct = $RenderCtx.CurrentProduct)
#set ($products = $RenderCtx.ProductList)
#set ($cCat = $RenderCtx.CurrentCategory)
#set ($cContent = $RenderCtx.CurrentContent)
#set ($catelist=$RenderCtx.CategoryList)
#set ($contentlist = $RenderCtx.ContentList)
#set ($forumlist = $RenderCtx.ForumList)
#set($cNode=$RenderCtx.CategoryNode.CategoryList)
#set ($ex = "_0_0/default.aspx")
#set ($count = 0)

#set ($default = 0)

<body style="background-color: #ffffff;margin: 0px;padding: 0px;color: #0a1d4d;font-size: smaller;">
    <div align="center" id="cmsFR_Center">
        <div id="cmsFR_dinamic">
            <div id="cmsFR_header">  ##-- header--
                 <div class="banner">
                     <div class="texttitle">
                        <b>cms forum </b> <br><p>support</p>
                     </div>
                 </div>
                 <div class="menu">
				 
				  #bindPage($pl)
				 
                 </div>
            </div>  ##-- end header--
			<div id="cmsFR_login">
					#if($isAdmin==1)
							<a href="../${PageID}_${CategoryID}_${ContentID}/default.aspx?forum=1">Management Forum</a>| 
					#end	
					
						#if($User.ID>0)
                			<a href="../${PageID}_0_0/default.aspx?logout=1" class="login"> Logout $User.Name</a>
                		#else
                			<a href="../${PageLoginID}_0_0/default.aspx?signup=1" class="login">Register</a> |
                			<a href="../${cpID}_${CategoryID}_0/default.aspx?userLogin=1" class="login">Login</a>
                		#end
			</div>
			
			<div id="cmsFR_bracump">
				<a href="../${cp.ID}_0_0/default.aspx" > $cp.Name </a>
					 #if($CategoryParentID>0)
						 -> <a href="../${cp.ID}_${CategoryParentID}_0/default.aspx" > $NameCategoryParentID </a>
					#end
					#if($cCat.ID>0)
						 -> <a href="../${cp.ID}_${CategoryParentID}_0/default.aspx" > $cCat.Name </a>
					#end				
				
			</div>
			<div id="cmsFR_bracump" style="text-align:right;">
				<a href="../${cp.ID}_${CategoryParentID}_0/default.aspx?searchForum=1" >Search</a>
			</div>	
			
			
			
			
			
			##------Start----Search------------
			#if ($searchForum=="1")
				<div id="addContent" >
					<div id="cmsFR_content">
						<div class="topic_title">
							Search Forum
						</div>
						<div>
							<form name="fSearch" method="Post">	
							<table cellpadding="2" cellspacing="4" border="0" style="width:500px;">
								<tr>
									<td style="width:220px;" align="right">
										Search for Keywords:
									</td>		
									<td style="width:280px;" align="left">
										<input type="text" name="txtforKeywords" maxlength="200" style="width:280px;">
									</td>	
								</tr>
								<tr>
									<td style="width:220px;" align="right">
										Search for Author:
									</td>		
									<td style="width:280px;" align="left">
										<input type="text" name="txtforAuthor" maxlength="200" style="width:280px;">
									</td>	
								</tr>
								<tr>
									<td align="right">
										Forum:
									</td>		
									<td align="left">
										<select name="ddForumSearch">
											<option>All available</option>
											#foreach($f in $forumlist)
												#if($f.Version==0)
													#foreach($c in $f.CategoryList)
														#if($c.Version==0)
														<option value="$c.ID">$c.Name</option> 
														#end
													#end	
												#end	
											#end										
										</select>
									</td>	
								</tr>
								<tr>
									<td align="right">
										Category:
									</td>		
									<td align="left">
										<select name="ddCategorySearch">
											<option>All available</option>
											#foreach($f in $forumlist)
												#if($f.Version==0)
													<option value="$f.ID">$f.Name</option> 
												#end	
											#end
										</select>
									</td>	
								</tr>
								<tr>
									<td>
										&nbsp;
									</td>		
									<td align="left">
										<input name="Submit" value="Search" type="button"/>
									</td>	
								</tr>
							</table>
						</div>
						
						<div class="topic_title">
	                        <table cellpadding="0" cellspacing="0" border="0" >
	                            <tr>
	                                <td class="left">
	                                  Forum
	                                </td>
	                                <td class="topic">
	                                   Topics
	                                </td>
	                                <td class="post">
	                                    Posts
	                                </td>
	                                <td class="day">
	                                    Last Post
	                                </td>
	                            </tr>
	                        </table>
						</div>
						
					</div>							
				</div>
				#set ($default = 1)
			#end
			##------End----Search------------
			
			
			##------Start----Login------------
			#if ($userLogin=="1")
				<div id="addContent" >
					<div id="cmsFR_content">
					<div class="topic_title">
					Please enter your username and password to log in.
					</div>
					<form name="fLogin" method="Post" action="../registerUser.aspx?login=1">	
					<table cellpadding="2" cellspacing="2" border="0" style="width:300px;">
						<tr>
							<td style="width:50px;" align="left">
								Username:
							</td>		
							<td style="width:250px;" align="left">
								<input type="text" name="tbUsername" style="width:150px;">
							</td>	
						</tr>
						<tr>
							<td align="left">
								Password:
							</td>
							<td align="left">
								<input type="password" name="tbPassword" style="width:150px;">
							</td>
						</tr>
						<tr>
							<td>
								&nbsp;
							</td>
							<td align="left">
							<input type="submit" value="Login" name="btnLogin">			
							</td>
						</tr>	
					</table>				
					</form>	
					</div>
				</div>
				#set ($default = 1)
			#end
			##------End----login------------
			
			
			
			##-----Start---- add thread -------------------------------
			#if ($thread=="1")
				<div id="addThread">
					<div id="cmsFR_content">
						<form name="addThread" method="Post" action="../ForumManagement.aspx">	
						<div class="topic_title">
		                        <table cellpadding="0" cellspacing="0" border="0" >   <tr> <td class="left"> Post a new Thread</td></tr></table>			
						</div>
						<div class="thead_content">
							<table cellpadding="2" cellspacing="2" border="0" >
								<tr>
									<td valign="top" align="left">
										Name
									</td>
									<td align="left">
										<input name="addThread" type="hidden"  value="1"/>
										<input name="pageID" type="hidden"  value="$cpID"/>
										<input type="text" name="txtThreadName" size="80" maxlength="500">
									</td>
									<td Style="Width:30%"></td>
								</tr>
								<tr>
									<td  align="left">Choose forum</td>
									<td align="left"> 
										<select name="ddlForumt"style="font-size:8pt">
											#foreach($f in $forumlist)
												#if($f.Version==0)
													<option value="$f.ID">$f.Name</option> 
												#end	
											#end
										</select>
									</td>
									<td Style="Width:30%"></td>
								</tr>
								<tr>
									<td valign="top" align="left" >
										Description
									</td>
									<td valign="top" align="left" style="width:50%">
										<textarea id="elm1" name="txtThreadDescription" rows="20" Style="width:100%"></textarea>

									</td>
									<td Style="Width:30%"></td>
								</tr>
								
								<tr>
									<td valign="top" align="center" colspan="2">
										<a href="#"  onclick="JsExp.SaveThread('')"> <img src="../Themes/Standard/Images/cmsFR_submiticon.gif" border="0"></a> 
									</td>
									<td Style="Width:30%"></td>
								<tr>						
							</table>
						</div>
						</form>		
					</div>
				</div>
				#set ($default = 1)
			#end
			##-----End---- add thread -------------------------------
			
			
			
			##-----Start---- Quote -------------------------------
			#if ($Quote=="1")
				#if($User.ID>0)
				#foreach($cn in $contentlist)
					#if($cn.ID==$ContentID)
						#set ($quoteName = $cn.Name)
						#set ($quoteDescription = $cn.Description)
					#end
				#end
				<div id="addThread">
					<div id="cmsFR_content">
						<form name="addQuote" method="Post" action="../ForumManagement.aspx">	
						<div class="topic_title">
		                        Post a reply
						</div>
						<div class="thead_content">
							<table cellpadding="2" cellspacing="2" border="0" >
								<tr>
									<td valign="top" align="left">
										Name
									</td>
									<td align="left">
										<input name="saveReply" type="hidden"  value="1"/>
										<input name="contentId" type="hidden"  value="$ContentID"/>
										<input name="topicId" type="hidden"  value="$cCat.ID"/>
										<input name="pageID" type="hidden"  value="$cpID"/>
										<input type="text" name="txtQuoteName" size="80" value=" Re: $quoteName"  maxlength="500">								
									</td>
									<td Style="Width:30%"></td>
								</tr>
								<tr>
									<td valign="top" align="left" >
										Description
									</td>
									<td valign="top" align="left" style="width:50%">
										<textarea id="elm1" name="txtQuoteDescription" rows="20" Style="width:100%" >[Quote]$quoteDescription[/Quote]</textarea>

									</td>
									<td Style="Width:30%"></td>
								</tr>
								
								<tr>
									<td valign="top" align="center" colspan="2">
										<a href="#"  onclick="JsExp.SaveReply('')"> <img src="../Themes/Standard/Images/cmsFR_submiticon.gif" border="0"></a> 
									</td>
									<td Style="Width:30%"></td>
								<tr>						
							</table>
						</div>
						</form>		
					</div>
				</div>
				#end
				#set ($default = 1)
			#end
			##-----End---- Quote -------------------------------
			
			
			
			
			
			##--------Start------Add topic--------------------- 
			#if ($topic=="1")
				#if($User.ID>0)
				<div id="addTopics">
					 <div id="cmsFR_content">
						<form name="addTopic" method="Post" action="../ForumManagement.aspx">	
						<div class="topic_title">
		                        <table cellpadding="0" cellspacing="0" border="0" >   <tr> <td class="left"> Post a new topic</td></tr></table>			
						</div>
						<div class="thead_content">
							<table cellpadding="2" cellspacing="2" border="0" width="100%">
								<tr>
									<td valign="top" align="left">
										Subject
									</td>
									<td>
										<input name="threadID" type="hidden"  value="$CategoryID"/>
										<input name="addTopic" type="hidden"  value="1"/>
										<input name="pageID" type="hidden"  value="$cpID"/>
										<input type="text" name="txtTopicName" size="80" maxlength="500">
									</td>
									<td style="width:30%"></td>
								</tr>
								<tr>
									<td valign="top" align="left">
										Body
									</td>
									<td valign="top" align="left" style="width:50%">
										<TEXTAREA name="txtTopicDescription" id="elm1" rows="20" Style="width:100%"> </TEXTAREA>
									</td>
									<td style="width:30%"></td>
								</tr>
								<tr>
									<td valign="top" align="center" colspan="2">
										<a href="#"  onclick="JsExp.saveTopics('')" > <img src="../Themes/Standard/Images/cmsFR_submiticon.gif" border="0"></a> 
										
									</td>
									<td style="width:30%"></td>
								<tr>						
							</table>
						</div>
						</form>		
					</div>
				</div>
				#end
				#set ($default = 1)
			#end
			##--------End------Add topic--------------------- 
			
			
			
			##------Start----Add content------------
			#if ($content=="1")
				#if($User.ID>0)	
				<div id="addContent" >
					<div id="cmsFR_content">
					<form name="addContent" method="Post" action="../ForumManagement.aspx">	
						<div class="topic_title">
		                        <table cellpadding="0" cellspacing="0" border="0" >   <tr> <td class="left"> Post a reply</td></tr></table>			
						</div>
						<div class="thead_content">
							<table cellpadding="2" cellspacing="2" border="0" width="100%">
								<tr>
									<td valign="top" align="left">
										Subject
									</td>
									<td>
										<input name="topicId" type="hidden"  value="$cCat.ID"/>
										<input name="addContent" type="hidden"  value="1"/>
										<input name="pageID" type="hidden"  value="$cpID"/>
										<input type="text" name="txtContentName" size="80" maxlength="500">
									</td>
									<td style="width:30%"></td>
								</tr>
								<tr>
									<td valign="top" align="left" >
										Body
									</td>
									<td valign="top" align="left" style="width:50%" >
										<TEXTAREA name="txtContentDescription" rows="20" Style="width:100%"> 										
										</TEXTAREA>
									</td>
									<td style="width:30%"></td>
								</tr>
								<tr>
									<td >
										
									</td>
									<td >
										<b>Attachfile</b>: <a href="#" onclick="JsExp.attachFile('')"> <img src="../Themes/Standard/Images/cmsFR_Attachfile.gif" border="0">					
										</a>
									</td>
									<td >
									</td>
								</tr>
								
								<tr>
									<td></td>
									<td>
										<b>Select file</b>: <select id="cbfile" name="cbfile" style="width:150px;" onchange="JsExp.chageFile('')">
										<option>------Choose file------</option>
										#foreach($file in $ListFile)
											<option>$file.Value</option>
										#end
										
										</select>
									</td>
									<td>
									</td>									
									</tr>								
								<tr>
									<td valign="top" align="center" colspan="2">
										<a href="#"  onclick="JsExp.saveContent('')"> <img src="../Themes/Standard/Images/cmsFR_submiticon.gif" border="0"></a> 
									</td>
									<td style="width:30%"></td>
								<tr>						
							</table>
						</div>
					</form>	
					</div>
				</div>
				#end
				#set ($default = 1)
			#end
			##------End----Add content------------
			
			##------Start----Edit content------------
			#if ($Edit=="1")		
				#if($User.ID>0)	
				<div id="addContent" >
					<div id="cmsFR_content">
					<form name="editContent" method="Post" action="../ForumManagement.aspx">	
						<div class="topic_title">
		                        <table cellpadding="0" cellspacing="0" border="0" >   <tr> <td class="left"> Post a reply</td></tr></table>			
						</div>
						<div class="thead_content">
							<table cellpadding="2" cellspacing="2" border="0" width="100%">
								#foreach($cn in $contentlist)
									#if($cn.ID==$ContentID)
								<tr>
									<td valign="top" align="left">
										Subject
									</td>
									<td>
										<input name="topicId" type="hidden"  value="$cCat.ID"/>
										<input name="contentId" type="hidden"  value="$ContentID"/>
										<input name="editContent" type="hidden"  value="1"/>
										<input name="pageID" type="hidden"  value="$cpID"/>
										<input type="text" name="txtContentName" size="80" value="${cn.Name}" maxlength="500">
									</td>
									<td style="width:30%"></td>
								</tr>
								<tr>
									<td valign="top" align="left" >
										Body
									</td>
									<td valign="top" align="left" style="width:50%" >
										<TEXTAREA name="txtContentDescription" rows="20" Style="width:100%"> 										$cn.Description
										</TEXTAREA>
									</td>
									<td style="width:30%"></td>
								</tr>
									#end
								#end
								<tr>
								<td></td>
								<td><a href="#" onclick="JsExp.attachFile('')" >Attach file </a><br>
									Select file: <select id="cbfile" name="cbfile" style="width:150px;" onchange="JsExp.chageFile('')">
									<option>------Choose file------</option>
									#foreach($file in $ListFile)
										<option>$file.Value</option>
									#end
									
									</select>
									
									</td>
								<td></td>
								</tr>
								
								<tr>
									<td valign="top" align="center" colspan="2">
										<a href="#"  onclick="JsExp.editContent('')"> <img src="../Themes/Standard/Images/cmsFR_submiticon.gif" border="0"></a> 
									</td>
									<td style="width:30%"></td>
								<tr>						
							</table>
						</div>
					</form>	
					</div>
				</div>
				#end	
				#set ($default = 1)
			#end
			##------End----Edit content-------------------------	
			
			
			##-----Start--------manager forum-------------------
			#if($forum == "1") 
				#if($isAdmin==1)
				<div id="cmsFR_content">				
					<div class="topic_title">
			            Manager forum
					</div>
						
					<div class="thead_content">	
					<table  border="1" >
						<tr>
							<td valign="top" style="text-align:left;padding-let:20px; width:20%">
								<a href="../${PageID}_0_0/default.aspx?forum=1&editF=2" > Add new Forums</a><br>
								<a href="#"> Manage Permissions</a><br>
								<a href="#"> Manage Lock </a><br>
											
							</td>
							<td style="width:80%">
							  #if(($EditF==1)||($EditF==2))
								<div>
								<form name="addForum" method="Post" action="../ForumManagement.aspx">						
								<input name="addForum" type="hidden"  value="1"/>
								<table cellpadding="2" cellspacing="2" border="0" width="100%">
									<tr>
										<td valign="top" align="left">
											Forum name:
										</td>
										<td align="left">
											#if ($EditF==2)
												<input name="ID" type="hidden"  value="0"/>
												<input type="text" name="txtForumName" size="80" value="" maxlength="500"/>
											#else
												<input name="ID" type="hidden"  value="$PageID"/>
												<input type="text" name="txtForumName" size="80" maxlength="500" value="$cp.Name"/>
											#end

											<input name="pageID" type="hidden"  value="$cp.ID"/>
											<input name="template" type="hidden" value="$cp.TemplateID"/>									
										</td>
									</tr>
									<tr>
										<td valign="top" align="left" colspan="2">
										</td>
									</tr>
									<tr>
										<td valign="top" align="left" colspan="2"  style="width:50%" >
										<TEXTAREA name="txtForumDescription" cols="45" rows="20"  style="width:100%" > #if ($EditF!=2) $cp.Description #end </TEXTAREA>
										</td>
										
									</tr>							
								
									<tr>
										<td valign="top" align="right">
											<b>Forum status:</b>
										</td>
										<td align="left">
											<select name="ddlForumStatus"style="font-size:8pt">						
												<option value="0">Enable</option>
												<option value="1">Disable</option>
											</select>
										</td>
									</tr>
									<tr>
										<td valign="top" align="center" colspan="2">
											<input type="button" value="Save" class="button" onclick="JsExp.AddForum('')" />
										</td>
									<tr>
								</table>	
							</form>
							</div>
							
							#if ($EditF==1)
							<div class="editThread">
								<table cellpadding="2" cellspacing="0">
									<tr >
										<td class="thead_title" width="80%">
											#foreach($f in $forumlist)
												#if($PageID==$f.ID)
													<b>$f.Name Information</b> 
												#end	
											#end	
										</td>
										<td class="thead_title" style="text-align:center;" width="10%">
											Close
										</td>
										<td class="thead_title" style="text-align:center;" width="10%">
											Open
										</td>
									</tr>		
								
								#foreach($f in $forumlist)
									#foreach($c in $f.CategoryList)
										#if($f.ID==$PageID)
										<tr>
											<td > 
												<b>$c.Name</b>
											</td>
											#if(${c.Version}==0)									
											<td  align="center">
												<a href="#" onclick="JsExp.editThread(1,$f.ID,$c.ID)">Action</a>
											</td>	
											<td>
												&nbsp;
											</td>
											#else
											<td>
												&nbsp;
											</td>
											<td align="center">
												<a href="#" onclick="JsExp.editThread(0,$f.ID,$c.ID)">Action</a>
											</td>	
											#end										
										</tr>
											#foreach($t in $c.CategoryList)
												<tr>
												<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					$t.Name														
												</td>
												#if(${t.Version}==0)
												<td  align="center">
													<a href="#" onclick="JsExp.editThread(1,$f.ID,$t.ID)">Action</a>
												</td>	
												<td>
													&nbsp;
												</td>
												#else
												<td>
													&nbsp;
												</td>
												<td align="center">
													<a href="#" onclick="JsExp.editThread(0,$f.ID,$t.ID)">Action</a>
												</td>	
											#end										
											</tr>											
											#end
										#end	
									#end	
								#end	
								</table>								
							</div>
							#end
							#else
							
								##--------------------------list					
								<div id="cmsFR_listF" >
									<table>
										<tr>
											<td class="thead_title"> Forum List </td>
											<td class="thead_title" style="text-align:center;" width="10%">Edit </td>
											<td class="thead_title" style="text-align:center;" width="10%">Active </td>
										</tr>
									#foreach($f in $forumlist)
									 <tr>
									   <td><b>$f.Name</b>									   
									   </td>
									   <td align="center">
											<a href="../${f.ID}_0_0/default.aspx?forum=1&editF=1">Edit</a>
									   </td>
									   <td align="center">
									    #if(${f.Version}==0)
											<a href="#" onclick="JsExp.editTopic(1,$f.ID,$f.ID)">Close</a>
										#else
											<a href="#" onclick="JsExp.editTopic(0,$f.ID,$f.ID)">Open</a>
										#end	
									   </td>
									</tr>
									#end
									</table>
								</div>
								</td>
							#end
						</tr>
					</table>
					</div>					
				#end	
				#set ($default = 1)
			#end     
			##---------End----manager forum-------------------
			
			
			##---------Start--Default==0------------------------------
			#if($default==0)
	           ##-- content--
						
				#if ($CategoryID==0)			
					## -------start forum-------------------------
				<div id="cmsFR_content"> 
					<div class="topic_title">
	                        <table cellpadding="0" cellspacing="0" border="0" >
	                            <tr>
	                                <td class="left">
	                                  Forum
	                                </td>
	                                <td class="topic">
	                                   Topics
	                                </td>
	                                <td class="post">
	                                    Posts
	                                </td>
	                                <td class="day">
	                                    Last Post
	                                </td>
	                            </tr>
	                        </table>
	                </div>
					#if($isAdmin==1)
						<div style="width:100%;text-align:left;padding-bottom:2px;">
							<a href="../${PageID}_${CategoryID}_${ContentID}/default.aspx?thread=1"> <img src="../Themes/Standard/Images/cmsFR_threaicon.gif" border="0"> </a>
						</div>	
					#end	
					#if($forumlist.Count>0)
						#foreach($f in $forumlist)
						 #if(${f.Version}==0) 
							<div class="thead_title">
							   $f.Name				
							</div>
							<div class="thead_content">
								<table cellpadding="0" cellspacing="0" border="0" >
								#foreach($t in $f.CategoryList)
									#if(${t.Version}==0)
									<tr>
										<td class="icon">
										  <img src="../Themes/Standard/images/cmsFR_folder.gif" border="0" />
										</td>
										<td class="summery">
											<b> <a href="../${f.ID}_${t.ID}_0/default.aspx"> $t.Name</a> </b><br>
											$t.Description
										</td>
										<td class="topic">
											$t.CategoryList.Count
										</td>
										<td class="post">
										
										#set ($CountNote=0) 
										#foreach($fn in $f.ContentList)
										   #foreach($tn in $t.CategoryList)
												#if ($fn.CategoryID==$tn.ID)
													#set ($CountNote = $CountNote+1)
												#end
										   #end
										#end
										$CountNote
										</td>
										<td class="day" align="center">
										#set ($LatPost=0) 
										#set ($author=0) 
										#set ($Topic=0)
										#foreach($fn in $f.ContentList)
										   #foreach($tn in $t.CategoryList)
												#if ($fn.CategoryID==$tn.ID)
													#set ($LatPost=${fn.CreatedDate}) 
													#set ($author=${fn.AuthorName}) 
													#set ($Topic=$tn.ID)
												#end
										   #end
										#end
										#if($CountNote>0)
											$LatPost
											<br>
											$author <a href="../${f.ID}_${Topic}_0/default.aspx"> <img src="../Themes/Standard/Images/cmsFR_view.gif" border="0"></a>
										#end
										&nbsp; 
										</td>
									</tr>
									#end ## endcategory
								#end	
								</table>
							</div>	
						 #end ## end forum
						#end
						#if($isAdmin==1)
							<div style="width:100%;text-align:left;padding-bottom:2px;">
								<a href="../${PageID}_${CategoryID}_${ContentID}/default.aspx?thread=1"> <img src="../Themes/Standard/Images/cmsFR_threaicon.gif" border="0"> </a>
							</div>	
						#end	
					#end		                   
	             
				</div>	 
				#end 
				
				#if (($cCat.ParentID==0 )&& ($CategoryID>0))					
				##----------------start topic--------------------
					<div id="cmsFR_content"> 
						<div class="topic_title" id="topic">							
	                        <table cellpadding="0" cellspacing="0" border="0" >
	                            <tr>
	                                <td class="left">
	                                  Topics 
	                                </td>
	                                <td class="topic">
	                                   Replies 
	                                </td>
	                                <td class="post">
	                                    Author 
	                                </td>
	                                <td class="day">
	                                    Last Post 
	                                </td>
	                            </tr>
	                        </table>
						</div>
						<div style="width:100%;text-align:left;padding-bottom:2px;">
							#if($User.ID>0)	
								<a href="../${PageID}_${CategoryID}_${ContentID}/default.aspx?topic=1">
							#else
							<a href="../${cpID}_${CategoryID}_0/default.aspx?userLogin=1" class="login">
							#end	
							<img src="../Themes/Standard/Images/cmsFR_topiicon.gif" border="0"></a>
						</div>
	                #if($catelist.Count>0)
						#foreach($c in $catelist)
							#if($c.ID==${CategoryID} && ${c.Version}==0)
								<div class="thead_title">
								   $c.Name					
								</div>
								<div class="thead_content">
									<table cellpadding="0" cellspacing="0" border="0" >
									#foreach($c in $c.CategoryList)
									  #if($c.Version==0)
										<tr>
											<td class="icon">
											  <img src="../Themes/Standard/images/cmsFR_folder.gif" border="0" />
											</td>
											<td class="summery">
												<b> <a href="../${PageID}_${c.ID}_0/default.aspx"> $c.Name</a> </b>
												
											</td>
											<td class="topic">
												#set ($CountNote=0) 
												#foreach($f in $forumlist)
													#foreach($fn in $f.ContentList)
														#if ($fn.CategoryID==$c.ID)
															#set ($CountNote=${CountNote}+1) 
															#set ($LatPost=${fn.CreatedDate}) 
															#set ($author=${fn.AuthorName}) 
														#end
													#end
													
												#end
												$CountNote
											</td>
											<td class="post">
												 $c.Author
											</td>
											<td class="day" align="center">
											#if($CountNote>0)
												 $LatPost
												 <br>
													$author <a href="../${PageID}_${c.ID}_0/default.aspx"> <img src="../Themes/Standard/Images/cmsFR_view.gif" border="0"></a>
											#end
											&nbsp; 
											</td>
										</tr>
										#end ## version
									#end	
									</table>
								</div>
							#end
						#end
						<div style="width:100%;text-align:left;padding-bottom:2px;">
							#if($User.ID>0)	
								<a href="../${PageID}_${CategoryID}_${ContentID}/default.aspx?topic=1">
							#else
							<a href="../${cpID}_${CategoryID}_0/default.aspx?userLogin=1" class="login">
							#end	
							<img src="../Themes/Standard/Images/cmsFR_topiicon.gif" border="0"></a>
						</div>
						
					#end

					#if($isAdmin==1)
					<div class="thead_title" style="text-align:right;">
					<select name="cbThread" onchange="JsExp.editTopic(this.value,$PageID,$CategoryID)" style="font-size:8pt">
						<option value="0"> Managerment Thread</option>
						<option value="1"> Close Thread  </option>						
						<option value="3" > Delete Thread</option>
					 </select>
					 <input type="hidden" value="$CategoryID" id="tId" name="tId">
					 <br>
					</div>					
					#end									
				</div>	
				
				<div class="jumpto">
					<form name="jumpto" method="Post">
						Jump to:<select name="ddlJumpto"style="font-size:8pt" onchange="JsExp.Jumpto('')">
						#foreach($f in $forumlist)
							#if(${f.Version}==0)
							<option value="${f.ID}_0_0" style="font-weight:bold;">$f.Name</option>
								#foreach($t in $f.CategoryList)
									#if(${t.Version}==0)
										#if($t.ID==$cCat.ID)
											<option value="${f.ID}_${t.ID}_0" selected>
											----$t.Name</option>
										#else
											<option value="${f.ID}_${t.ID}_0">
											----$t.Name</option>
										#end										
										#foreach($c in $t.CategoryList)
											#if(${c.Version}==0)
												#if($c.ID==$cCat.ID)
													<option value="${f.ID}_${c.ID}_0" selected>
													---------$c.Name</option>
												#else
													<option value="${f.ID}_${c.ID}_0">
													---------$c.Name</option>
												#end
											#end	
										#end
									#end	
								#end
							#end	
						#end						
						</select>
					</form>
				</div>	
				
				#end
				
				
				#if (($cCat.ParentID>0 )&& ($CategoryID>0))	
				##----------------start content----------------------					
				<div id="cmsFR_content"> 
					## --------start  View previous topic--View next topic--
					<div class="next_previous">
					#set($next = 1)
					#foreach($t in $catelist)
						#if($CategoryParentID==$t.ID && $next<2 && ${t.Version}==0)
						#foreach($c in $t.CategoryList)
							#if(${c.Version}==0)
								#if($next<2)
									#if($cCat.ID!=$c.ID)
										#set($previous= $c.ID)
									#else	
										#if($cCat.ID==$c.ID)
										#set($next =$next+1)
										#if($previous)
											<a href="../${cpID}_${previous}_0/default.aspx"><< View previous topic</a>&nbsp;&nbsp; :: &nbsp;&nbsp;									#end
										#end	
									#end
								#else
								#if($next==2)
									<a href="../${cpID}_${c.ID}_0/default.aspx">View next topic >></a> 
									#set($next =$next+1)
								#end	
								#end
							#end
						#end						
						#end
					#end													
					</div>
				## --------End View previous topic--View next topic--
					<div style="width:100%;text-align:left;padding-bottom:2px;">
						#if($User.ID>0)
						<a href="../${PageID}_${CategoryID}_${ContentID}/default.aspx?content=1">
						#else
						<a href="../${cpID}_${CategoryID}_0/default.aspx?userLogin=1" class="login">
						#end				
						<img src="../Themes/Standard/Images/cmsFR_posticon.gif" border="0"> </a>
					</div> 						
	                #if($contentlist.Count>0)
						
						<div class="thead_content">
							<table cellpadding="0" cellspacing="0" border="0" >
								<tr class="thead_title">
									<td class="icon" align="center">
									 Author 
									</td>
									
									<td class="day" align="center">
									 Message
									</td>
								</tr>
						#foreach($cn in $contentlist)
							#if(${cn.Version}==0)
								<tr>
									<td class="icon" valign="top">
										<br><b>$cn.AuthorName</b>
										<br>
										$cn.AuthorInfo
									</td>
									
									<td class="day">
										
										<div style="text-align:right;">
											#if($User.ID>0)
												<a href="../${PageID}_${CategoryID}_${cn.ID}/default.aspx?quote=1">
											#else
												<a href="../${cpID}_${CategoryID}_0/default.aspx?userLogin=1" class="login">
											
											#end
											<img src="../Themes/Standard/Images/cmsFR_quateicon.gif" border="0"></a>
											
											#if($cn.Author==$User.ID || $isAdmin==1)
											<a href="../${PageID}_${CategoryID}_${cn.ID}/default.aspx?edit=1">
											<img src="../Themes/Standard/Images/cmsFR_editicon.gif" border="0"></a>
											<a href="#" onclick="JsExp.DeleteContent('${cn.ID}','${PageID}','${CategoryID}')">
											<img src="../Themes/Standard/Images/cmsFR_deleteicon.gif" border="0"></a>
											#end
											
										</div>											
										<br>
										<b>PostPosted:</b> $cn.CreatedDate <br>
										<b>Post subject:</b> $cn.Name <br>
										<div style="border-top:1px solid #d6d6d6 ;width:100%">&nbsp;</div>
										<br>
										$cn.Description <br><br>
										
										#if($cn.NoteList.Count>0)
										<div style="border-top:2px solid #FEC067 ;width:100%">&nbsp;</div> 
											#foreach($note in $cn.NoteList)
											<div style="border-bottom:0px solid #d6d6d6 ;width:100%">													 <b>$note.AuthorName </b><br>
													Posted:  <i>$note.CreatedDate</i>
													&nbsp;&nbsp;&nbsp;&nbsp;Post subject: $note.Name<br><br>
											</div> 	
											<div class="contentnote">	
												$note.Description
											</div>
											#end
											
										#end
									</td>
								</tr>
							#end	
						#end
							</table>
						<div style="width:100%;text-align:left;padding-bottom:2px;">
							#if($User.ID>0)
							<a href="../${PageID}_${CategoryID}_${ContentID}/default.aspx?content=1">
							#else
							<a href="../${cpID}_${CategoryID}_0/default.aspx?userLogin=1" class="login">
							#end				
							<img src="../Themes/Standard/Images/cmsFR_posticon.gif" border="0"> </a>
						</div> 						
					</div>					
					#else
					<div class="info">
							There are no newer topics in this forum
					</div>						
					#end	
					
					#if($isAdmin==1)
					<div class="thead_title" style="text-align:right;">
						<select name="cbTopic" onchange="JsExp.editTopic(this.value,$PageID,$CategoryID)" style="font-size:8pt">
							<option value="0"> Managerment Topic</option>
							<option value="1"> Close Topic </option>							
							<option value="3"> Delete Topic</option>
						 </select>						
					</div>
					#end
				</div>	 
				
				
				<div class="jumpto">
					<form name="jumptoview" method="Post">
						Jump to:<select name="ddlJumptoview"style="font-size:8pt" onchange="JsExp.Jumptoview('')">
						
						#foreach($f in $forumlist)
							#if(${f.Version}==0)
							<option value="${f.ID}_0_0" style="font-weight:bold;">$f.Name</option>
								#foreach($t in $f.CategoryList)
									#if(${t.Version}==0)
										<option value="${f.ID}_${t.ID}_0">
										----$t.Name</option>
										#foreach($c in $t.CategoryList)
											#if(${c.Version}==0)
												#if($c.ID==$cCat.ID)
													<option value="${f.ID}_${c.ID}_0" selected>
													---------$c.Name</option>
												#else
													<option value="${f.ID}_${c.ID}_0">
													---------$c.Name</option>
												#end
											#end	
										#end
									#end	
								#end
							#end	
						#end
						</select>
					</form>
				</div>		
					
				
				#end
			
			#end 
			##---------End--Default==0------------------------------
			
			
			
			
			##-- Start--- user oline  --
            <div id="cmsFR_content">
                <div class="topic_title">
                      <span> Who Is Online</span>
                </div>
                <div class="usonline_content">
                    Our users have posted a total of ${Post} articles<br>
                    We have ${TotalUser} registered users<br>
                    The newest registered user is ${UserNew.Name}<br>
                </div>
            </div>
            ##-- end   user oline  --
		
			
            ##----Start---footer-----
             <div id="cmsFR_footer">

                  @copyright 2007 <br>
                  Power Design: IGLOBALIS , LLC

             </div>
			##----End---footer-----
        </div> ##---End---div--cmsFR_dinamic
    </div> ##----End---div---cmsFR_Center
</body>
</html>